using System;
using System.IO;
using System.Net;
using System.Text;
namespace utils
{
	public class aspx2htm
	{
		public static void process(string src, string objDir, string objFile)
		{
			WebRequest webRequest = WebRequest.Create(src);
			WebResponse response = webRequest.GetResponse();
			StreamReader streamReader = new StreamReader(response.GetResponseStream(), Encoding.get_UTF8());
			string text = streamReader.ReadToEnd();
			streamReader.Close();
			if (text.get_Length() > 10)
			{
				if (!Directory.Exists(objDir))
				{
					Directory.CreateDirectory(objDir);
				}
				FileStream fileStream = new FileStream(objDir + objFile, 2, 2);
				StreamWriter streamWriter = new StreamWriter(fileStream, Encoding.get_UTF8());
				streamWriter.WriteLine(text);
				streamWriter.Close();
				fileStream.Close();
			}
		}
	}
}
